package com.kuang.dao;

import com.kuang.pojo.Books;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface BookMapper {
    //增加一个Book
    int addBook(Books book);

    //根据id删除一个Book
    int deleteBookById(@Param("bookID") int bookID);

    //更新Book
    int updateBook(Books books);

    //根据id查询,返回一个Book
    Books queryBookById(@Param("bookID")int bookID);

    //查询全部Book,返回list集合
    List<Books> queryAllBook();

    //查询所有的包含改名字的书本，返回list集合
    List<Books> queryBookByName(@Param("bookName") String bookName);
}
